# Copyright (C) Kumo inc. and its affiliates.
# Author: Jeff.li lijippy@163.com
# All rights reserved.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https:#www.gnu.org/licenses/>.
#
add_executable(pollux_exec_vector_hasher_benchmark VectorHasherBenchmark.cpp)

target_link_libraries(
  pollux_exec_vector_hasher_benchmark pollux_exec pollux_vector_test_lib
  Melon::melonbenchmark)

add_executable(pollux_filter_project_benchmark FilterProjectBenchmark.cpp)

target_link_libraries(
  pollux_filter_project_benchmark
  pollux_exec
  pollux_vector_test_lib
  pollux_exec_test_lib
  Melon::melonbenchmark)

add_executable(pollux_exchange_benchmark ExchangeBenchmark.cpp)

target_link_libraries(
  pollux_exchange_benchmark
  pollux_exec
  pollux_exec_test_lib
  pollux_vector_test_lib
  Melon::melonbenchmark)

add_executable(pollux_merge_benchmark MergeBenchmark.cpp)

target_link_libraries(
  pollux_merge_benchmark
  pollux_exec
  pollux_vector_test_lib
  Melon::melonbenchmark
  GTest::gtest
  GTest::gtest_main)

add_executable(pollux_hash_benchmark HashTableBenchmark.cpp)

target_link_libraries(
  pollux_hash_benchmark
  pollux_exec
  pollux_exec_test_lib
  pollux_profiler
  pollux_vector_test_lib
  Melon::melonbenchmark)

add_executable(pollux_hash_join_list_result_benchmark
               HashJoinListResultBenchmark.cpp)

target_link_libraries(
  pollux_hash_join_list_result_benchmark
  pollux_exec
  pollux_exec_test_lib
  pollux_vector_test_lib
  Melon::melonbenchmark)

add_executable(pollux_hash_join_prepare_join_table_benchmark
               HashJoinPrepareJoinTableBenchmark.cpp)

target_link_libraries(
  pollux_hash_join_prepare_join_table_benchmark
  pollux_exec
  pollux_exec_test_lib
  pollux_vector_test_lib
  Melon::melonbenchmark)

  add_executable(pollux_sort_benchmark RowContainerSortBenchmark.cpp)

  target_link_libraries(
    pollux_sort_benchmark
    pollux_exec
    pollux_exec_test_lib
    pollux_dwio_parquet_reader
    pollux_vector_test_lib
    Melon::melonbenchmark
          Arrow::arrow_static
          thrift::thrift)

add_library(pollux_orderby_benchmark_util OrderByBenchmarkUtil.cpp)

target_link_libraries(
  pollux_orderby_benchmark_util pollux_vector_fuzzer pollux_vector_test_lib)

add_executable(pollux_prefixsort_benchmark PrefixSortBenchmark.cpp)

target_link_libraries(
  pollux_prefixsort_benchmark pollux_exec pollux_orderby_benchmark_util
  Melon::melonbenchmark)

add_executable(pollux_orderby_benchmark OrderByBenchmark.cpp
                                       OrderByBenchmarkUtil.cpp)

target_link_libraries(
  pollux_orderby_benchmark
  pollux_exec
  pollux_exec_test_lib
  pollux_orderby_benchmark_util
  pollux_vector_fuzzer
  pollux_vector_test_lib
  Melon::melonbenchmark)

add_executable(pollux_window_prefixsort_benchmark WindowPrefixSortBenchmark.cpp)

target_link_libraries(
  pollux_window_prefixsort_benchmark
  pollux_aggregates
  pollux_exec
  pollux_exec_test_lib
  pollux_hive_connector
  pollux_vector_fuzzer
  pollux_vector_test_lib
  pollux_window
  Melon::melonbenchmark)
